<?php
//配置您申请的appkey
$appkey = "dee0b45b92d465e75faa316e0104f62b";
 
 
 
 
//************1.影视搜索************
$url = "http://op.juhe.cn/onebox/movie/video";
$params = array(
      "key" => $appkey,//应用APPKEY(应用详细页查询)
      "dtype" => "",//返回数据的格式,xml或json，默认json
      "q" => "杀破狼2",//影视搜索名称
);
$paramstring = http_build_query($params);
$content = juhecurl($url,$paramstring);
$result = json_decode($content,true);
if($result){
    if($result['error_code']=='0'){
        //print_r($result);
    }else{
        echo $result['error_code'].":".$result['reason'];
    }
}else{
    echo "请求失败";
}
//**************************************************
 
 
 
 
//************2.最近影讯************
$url = "http://op.juhe.cn/onebox/movie/pmovie";
$params = array(
      "key" => $appkey,//应用APPKEY(应用详细页查询)
      "dtype" => "",//返回数据的格式,xml或json，默认json
      "city" => "贵阳",//城市名称
);
$paramstring = http_build_query($params);
$content = juhecurl($url,$paramstring);
$result = json_decode($content,true);
if($result){
    if($result['error_code']=='0'){
        print_r($result);
    }else{
        echo $result['error_code'].":".$result['reason'];
    }
}else{
    echo "请求失败";
}
//**************************************************
 
?>